﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CMS6Tools.TFSTasks
{
    class Program
    {
        static void Main(string[] args)
        { 
#if DEBUG
            var tfsSendTask = new TFSTasks.Tasks.TfsEffortReportTask();
            tfsSendTask.Execute();
            return;
#else
            if (args.Length > 0)
            {
                var taskTypeName = args[0];
                var taskType = TaskManager.GetTaskType(taskTypeName);
                if (taskType != null) 
                {
                    var task = Activator.CreateInstance(taskType) as ITask;
                    task.Execute(args.Skip(1).ToArray());
                }
            }
#endif
        }
    }
}
